import pygame, sys, math

class Darkness():
    def __init__(self, image):
        self.image = pygame.image.load(image)
        self.rect = self.image.get_rect()
        
    def lightup(self):
        self.image = pygame.transform.scale(self.image, (1800*2,1400*2))
        
    def distanceToPoint(self, pt):
        x1 = self.rect.center[0]
        y1 = self.rect.center[1]
        x2 = pt[0]
        y2 = pt[1]
        
        return math.sqrt(((x2-x1)**2)+((y2-y1)**2))
        
    def move(self, player):
        self.rect.center = player.rect.center